-- GENERATED SPELL FOR [Spirestone Ogre Magus] --


function spell0_9201(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(15979,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9201', 1000, 1)
end

function spell1_9201(pUnit, Event) --@Bloodlust,n/a--
pUnit:FullCastSpellOnTarget(6742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9201', 30309, 1)
end

function spell2_9201(pUnit, Event) --@Slow,n/a--
pUnit:FullCastSpellOnTarget(13747,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9201', 10000, 1)
end

function Sorts_9201(pUnit, Event)
local choix_sorts_9201 = math.random(0, 2)
if choix_sorts_9201 == 0 then
pUnit:RegisterEvent('spell0_9201', 1, 1)
end
if choix_sorts_9201 == 1 then
pUnit:RegisterEvent('spell1_9201', 1, 1)
end
if choix_sorts_9201 == 2 then
pUnit:RegisterEvent('spell2_9201', 1, 1)
end
end

function mob9201_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_9201', math.random(1500, 3000), 1)
end

function mob9201_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9201_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9201_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(9201, 1, 'mob9201_Action')
RegisterUnitEvent(9201, 2, 'mob9201_Leave')
RegisterUnitEvent(9201, 3, 'mob9201_Kill')
RegisterUnitEvent(9201, 4, 'mob9201_Die')
